﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Freebase4net.Tests
{
    [TestClass]
    public class TextServiceTests
    {
        private TextService _textService;
        private string _id;

        public TextServiceTests()
        {
            _textService = FreebaseServicesBuilder.CreateTextService();
            _id = "/en/the_animal";
        }

        [TestMethod]
        public void Read_Id_StatusCodeOk()
        {
            var result = _textService.Read(_id);


            Assert.AreEqual(System.Net.HttpStatusCode.OK, result.Status);
        }

        [TestMethod]
        public async Task ReadAsync_Id_StatusCodeOk()
        {
            TextServiceResponse result = await _textService.ReadAsync(_id);


            Assert.AreEqual(System.Net.HttpStatusCode.OK, result.Status);
        }
    }
}
